import { BASE } from '../api'
import { METHOD, request } from '@/utils/request'

// 考核条例列表
export async function getRegulationList(params) {
    return request(`${BASE}/regulation/page`, METHOD.POST, params)
}
// 考核条例树状
export async function getRegulationTree() {
    return request(`${BASE}/regulation/tree`, METHOD.POST, {})
}

// 考核条例获取详情
export async function getRegulation(params) {
    return request(`${BASE}/regulation/get`, METHOD.POST, params)
}

// 考核类型
export async function getTypeList(params) {
    return request(`${BASE}/basic/type/query`, METHOD.POST, params)
}

// 新增考核条例
export async function regulationSave(params) {
    return request(`${BASE}/regulation/save`, METHOD.POST, params)
}

// 更新考核条例
export async function regulationUpdate(params) {
    return request(`${BASE}/regulation/update`, METHOD.POST, params)
}

// 删除考核条例
export async function regulationDel(params) {
    return request(`${BASE}/regulation/del`, METHOD.POST, params)
}

export default {
    getRegulationList,
    getRegulationTree,
    getRegulation,
    getTypeList,
    regulationSave,
    regulationUpdate,
    regulationDel
}